import time
class LogUtils:
    @classmethod
    def log(cls,path_name,file_name,str):
        path_file = path_name+file_name
        with open(path_file,'a',encoding='utf8') as f: #append追加写
            f.write(str+'\n')

logUtils = LogUtils()
# path_name = '/usr/ftp/logs/jobs_companies'
# path_name = '/usr/ftp/logs/students'
# path_name = '/usr/ftp/logs/jobs'
path_name = '/usr/ftp/logs/send_logs'

# path_name = 'd:log'
current_time = time.localtime(time.time())

current_time_str = time.strftime('%Y-%m-%d',current_time) #参数2为格式化字符串
print(current_time_str)
file_name = current_time_str+'_jobs.log'
str = current_time_str+','+"111111111"
logUtils.log(path_name,file_name,str)
